import request from '@/utils/request'

// 查询销售发票列表
export function listSalesInvoice(query) {
  return request({
    url: '/xs/salesInvoice/list',
    method: 'get',
    params: query
  })
}

// 查询销售发票详细
export function getSalesInvoice(invoiceId) {
  return request({
    url: '/xs/salesInvoice/' + invoiceId,
    method: 'get'
  })
}

// 新增销售发票
export function addSalesInvoice(data) {
  return request({
    url: '/xs/salesInvoice',
    method: 'post',
    data: data
  })
}

// 修改销售发票
export function updateSalesInvoice(data) {
  return request({
    url: '/xs/salesInvoice',
    method: 'put',
    data: data
  })
}

// 删除销售发票
export function delSalesInvoice(invoiceId) {
  return request({
    url: '/xs/salesInvoice/' + invoiceId,
    method: 'delete'
  })
}
